package com.cn.kabalifeuser.ui.my.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.cn.kabalifeuser.R;
import com.cn.kabalifeuser.ui.my.bean.FansListBean;
import com.cn.kabalifeuser.utils.GlideUtil;

import java.util.List;

/**
 * Created by 晓林 on 2020/9/4.
 * function:
 */
public class FansListAdapter extends BaseQuickAdapter<FansListBean.ResultBean.DataBean, BaseViewHolder> {
    public FansListAdapter(int layoutResId, @Nullable List<FansListBean.ResultBean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, final FansListBean.ResultBean.DataBean item) {
        GlideUtil.ImageLoad(this.mContext, item.getHead(), helper.getView(R.id.head));
        helper.setText(R.id.tv_nickname, item.getNickname())
                .setText(R.id.tv_created_at, "注册时间: " + item.getCreated_at())
                .setText(R.id.tv_sub, String.valueOf(item.getSub()));
    }
}

